:root {
  --prismara-pearl: #f6f7f3;
  --prismara-mist: #e5ece9;
  --prismara-sage: #b9d0c2;
  --prismara-teal: #79b7b2;
  --prismara-deep-teal: #2f6f6b;
  --prismara-coral: #d99387;
  --prismara-lavender: #b5a4cf;
  --prismara-gold: #c8ab77;
  --prismara-line: rgba(159,185,168,.25);

  /* Existing exhibits use these common tokens. */
  --dust: var(--prismara-pearl);
  --dust-mid: var(--prismara-mist);
  --dust-dim: var(--prismara-sage);
  --sage: var(--prismara-sage);
  --sage-dim: var(--prismara-deep-teal);
  --cyan: var(--prismara-teal);
  --violet: var(--prismara-lavender);
  --orange: var(--prismara-coral);
}

html,
body {
  color: var(--prismara-pearl);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Primary exhibit identity: intentionally small, but never faint. */
#title,
#header h1,
.header h1,
.title,
body > h1 {
  color: var(--prismara-pearl) !important;
  font-weight: 700 !important;
  text-shadow: 0 0 22px rgba(246,247,243,.12);
}

#subtitle,
#header .sub,
.header .sub,
.subtitle {
  color: var(--prismara-sage) !important;
  font-weight: 600 !important;
  opacity: 1 !important;
}

/* Site-wide accessibility floor for exhibit text. */
#prose p,.prose p,#prose .pa,.prose .pa,.pa,.description,.explanation {
  font-size:max(.88rem,14px) !important;
  line-height:1.8 !important;
  color:#e2e9e6 !important;
  font-weight:500 !important;
}
#prose :is(.psub,.kicker),.prose :is(.psub,.kicker),
.eq-l,.eq-live,.eq-label,.panel-label,.param-name,.rc-label,.sr-label,.c-name,.readout-label,.ctrl-label,
.sub,.subtitle,.hint,.instruction,.note {
  font-size:max(.68rem,11px) !important;
  color:#bfd3c7 !important;
  font-weight:650 !important;
}
button,.ctrl-btn,.flow-btn,.att-btn,.mode-tab,.shape-btn,.preset-btn,.toggle-btn {
  font-size:max(.66rem,11px) !important;
  font-weight:650 !important;
}

/* Formulae and scientific readouts. Colored variables retain meaning. */
#eq-strip,
.equation,
.formula,
.formula-text,
.eq-f {
  color: var(--prismara-pearl) !important;
  font-weight: 600 !important;
  border-color: var(--prismara-line) !important;
}

.eq-l,
.eq-live,
.eq-label,
.panel-label,
.param-name,
.rc-label,
.sr-label,
.c-name,
.readout-label,
.ctrl-label {
  color: var(--prismara-sage) !important;
  font-weight: 600 !important;
}

.rc-val,
.sr-val,
.param-val,
.readout-value,
.value {
  color: var(--prismara-pearl);
  font-weight: 600;
}

/* Refined chromatic notation: coral, sage, mineral teal, lavender, warm gold. */
.eq-x,
.eq-s1,
.eq-p,
.eq-chaos { color: var(--prismara-coral) !important; }
.eq-y,
.eq-order { color: var(--prismara-sage) !important; }
.eq-z,
.eq-s2,
.eq-cyan { color: var(--prismara-teal) !important; }
.eq-b,
.eq-s3,
.eq-violet { color: var(--prismara-lavender) !important; }
.eq-s,
.eq-r,
.eq-cx,
.eq-alpha,
.eq-gold { color: var(--prismara-gold) !important; }

/* Controls need to remain legible before they become active. */
button,
.ctrl-btn,
.flow-btn,
.att-btn,
.mode-tab,
.shape-btn,
.preset-btn,
.toggle-btn {
  color: var(--prismara-mist);
  font-weight: 600 !important;
  border-color: rgba(159,185,168,.32) !important;
}

button:hover,
.ctrl-btn:hover,
.flow-btn:hover,
.att-btn:hover,
.mode-tab:hover,
.shape-btn:hover,
.preset-btn:hover,
.toggle-btn:hover,
button.active,
.ctrl-btn.active,
.flow-btn.active,
.att-btn.active,
.mode-tab.active,
.shape-btn.active,
.preset-btn.active,
.toggle-btn.active {
  color: var(--prismara-pearl) !important;
  border-color: var(--prismara-teal) !important;
  background: rgba(121,183,178,.09) !important;
  box-shadow: 0 0 18px rgba(121,183,178,.1);
}

/* Interpretive writing: brighter and slightly heavier on dark fields. */
#prose h2,
.prose h2,
.prose-title {
  color: var(--prismara-pearl) !important;
  font-weight: 600 !important;
}

#prose p,
.prose p,
#prose .pa,
.prose .pa,
.pa,
.description,
.explanation {
  color: var(--prismara-mist) !important;
  font-weight: 500 !important;
}

#prose strong,
.prose strong,
.pa strong,
strong {
  color: #ffffff !important;
  font-weight: 700 !important;
}

#prose .psub,
.prose .psub,
#prose .kicker,
.prose .kicker,
.psub,
.kicker {
  color: var(--prismara-sage) !important;
  font-weight: 600 !important;
}

#start-overlay p,
.start-overlay p,
#butterfly,
.status,
.hint,
.instruction,
.note {
  color: var(--prismara-mist) !important;
  font-weight: 600 !important;
}

input,
select {
  color: var(--prismara-pearl);
}

::selection {
  color: #08100f;
  background: var(--prismara-teal);
}

/* A consistent escape hatch across every full-screen interactive work. */
.prismara-exhibit-back {
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 999px;
  color: #f6f7f3 !important;
  background: linear-gradient(145deg,rgba(255,255,255,.13),rgba(255,255,255,.035)),rgba(8,12,14,.58);
  -webkit-backdrop-filter: blur(18px) saturate(135%);
  backdrop-filter: blur(18px) saturate(135%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.22),inset 0 -1px 0 rgba(0,0,0,.3),0 8px 26px rgba(0,0,0,.22);
  font-family: "Poppins", Avenir, sans-serif;
  font-size: .62rem;
  font-weight: 600;
  letter-spacing: .13em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  transition: transform .25s,border-color .25s,background .25s,box-shadow .25s;
}
.prismara-exhibit-back:hover {
  transform: translateX(-2px);
  border-color: rgba(121,183,178,.72);
  background: linear-gradient(145deg,rgba(121,183,178,.2),rgba(255,255,255,.04)),rgba(8,12,14,.66);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.26),0 0 24px rgba(121,183,178,.18);
}
.prismara-exhibit-back:focus-visible { outline:2px solid var(--prismara-teal); outline-offset:3px; }

@media (max-width: 700px) {
  .prismara-exhibit-back { top:10px; left:10px; padding:8px 11px; font-size:.56rem; }
}

/* Escape Velocity: lift the formerly muted interface text halfway to white. */
.escape-velocity-exhibit #header p,
.escape-velocity-exhibit .ctrl {
  color: #e0e7dc;
  opacity: 1;
  font-weight: 500;
}
.escape-velocity-exhibit #phase-label {
  color: #edf3e9;
  opacity: 1;
  font-weight: 600;
  text-shadow: 0 1px 10px rgba(0,0,0,.8);
}
.escape-velocity-exhibit #footer-note {
  color: #c7d0c4;
  font-weight: 500;
}
.escape-velocity-exhibit input[type="range"] { background:#4a5747; }
.escape-velocity-exhibit input[type="range"]::-webkit-slider-thumb { background:#edf3e9; }

/* Physics Animated: shared chamber rhythm and entry transition. */
.physics-animated-exhibit :is(
  #header .sub,.ctrl-btn,.shape-btn,.time-btn,.att-btn,.panel-label,.param-name,
  .rc-label,.state-label,.st-label,.freq-label,#dial-label,#h-title,#shape-title,
  #time-title,#butterfly,.eq-live
) {
  font-size:max(.64rem,10.5px) !important;
  line-height:1.35 !important;
  font-weight:600 !important;
}
.physics-animated-exhibit:not(.schrodinger-exhibit) #header { padding-top:3.5rem !important; }
.physics-animated-exhibit #header h1 { font-size:max(.72rem,11.5px) !important; letter-spacing:.3em !important; }
.physics-animated-exhibit :is(#controls,#shape-btns,#time-btns,#param-panel,#readout,#attractor-row) {
  transition:opacity .35s ease,filter .35s ease;
}
.physics-animated-exhibit .prismara-secondary-controls { opacity:.46; filter:saturate(.66); }
.physics-animated-exhibit .prismara-secondary-controls:hover,
.physics-animated-exhibit .prismara-secondary-controls:focus-within { opacity:1; filter:saturate(1); }
.physics-animated-exhibit .prismara-primary-control {
  border-color:rgba(88,153,206,.72) !important;
  color:#b9ddf3 !important;
  background:rgba(88,153,206,.1) !important;
  box-shadow:0 0 22px rgba(88,153,206,.12);
}
.physics-animated-exhibit .prismara-primary-surface {
  border-color:rgba(88,153,206,.28) !important;
  box-shadow:0 16px 55px rgba(20,68,102,.1);
}
.physics-animated-exhibit .prismara-guidance {
  width:min(520px,88vw);margin:.45rem auto .7rem;padding:.5rem .85rem;
  color:#c3d3db !important;background:rgba(88,153,206,.045);
  border-left:1px solid rgba(88,153,206,.42);
  font:600 max(.68rem,11px)/1.55 'Poppins',sans-serif;
  letter-spacing:.06em;text-align:center;
}
.prismara-entry-overlay {
  position:fixed; inset:0; z-index:500;
  display:grid; place-items:center; padding:24px;
  color:#f6f7f3;
  background:radial-gradient(circle at 50% 42%,rgba(55,111,151,.2),transparent 34rem),rgba(5,7,10,.965);
  -webkit-backdrop-filter:blur(18px); backdrop-filter:blur(18px);
  transition:opacity .65s ease,visibility .65s ease;
}
.prismara-entry-overlay.leaving { opacity:0; visibility:hidden; }
.prismara-entry-inner { width:min(520px,92vw); text-align:center; }
.prismara-entry-inner > span {
  display:block; margin-bottom:18px;
  color:#78b3df; font:600 .68rem 'Poppins',sans-serif;
  letter-spacing:.26em; text-transform:uppercase;
}
.prismara-entry-inner h2 {
  margin:0 0 16px; color:#f6f7f3;
  font:300 clamp(2rem,6vw,4.25rem)/1.02 'Poppins',sans-serif;
  letter-spacing:-.045em;
}
.prismara-entry-inner p {
  max-width:430px; margin:0 auto 28px;
  color:#aeb9c0; font:400 .88rem/1.75 'Poppins',sans-serif;
}
.prismara-entry-inner button {
  padding:12px 25px; border:1px solid rgba(88,153,206,.56); border-radius:999px;
  color:#b9ddf3; background:rgba(88,153,206,.08);
  font:600 .66rem 'Poppins',sans-serif; letter-spacing:.2em; text-transform:uppercase;
  cursor:pointer; transition:transform .25s,border-color .25s,box-shadow .25s,background .25s;
}
.prismara-entry-inner button:hover,.prismara-entry-inner button:focus-visible {
  transform:translateY(-2px); border-color:#78b3df; background:rgba(88,153,206,.15);
  box-shadow:0 0 28px rgba(88,153,206,.2); outline:none;
}
.schrodinger-exhibit .equation-instruction {
  margin:0 0 12px; padding:8px 14px;
  border:1px solid rgba(69,182,232,.24); border-radius:999px;
  color:#8fcfec; background:rgba(69,182,232,.055);
  font:600 .65rem 'Poppins',sans-serif; letter-spacing:.12em; text-transform:uppercase;
}
.schrodinger-exhibit .annot-group:focus { outline:none; }
.schrodinger-exhibit .annot-group:focus .annot-box,
.schrodinger-exhibit .annot-group.open .annot-box { opacity:1; }

@media (prefers-reduced-motion:reduce) {
  .prismara-entry-overlay { transition-duration:.001ms; }
}

/* Infinite Forms: one centered typographic system with a richer spectrum. */
.infinite-forms-exhibit {
  --prismara-form-violet:#b794ff;
  --prismara-form-teal:#69d4c5;
  --prismara-form-coral:#f08c79;
  --prismara-form-gold:#e8c66f;
}
.infinite-forms-exhibit > :is(#title,#header) {
  box-sizing:border-box;
  width:100%;
  padding:3.9rem 1.25rem 0 !important;
  margin:0 auto 1rem !important;
  text-align:center !important;
}
.infinite-forms-exhibit > #title,
.infinite-forms-exhibit #header h1 {
  color:#f5f0ff !important;
  font-family:'Poppins',sans-serif !important;
  font-size:clamp(1.3rem,2.7vw,2rem) !important;
  font-weight:400 !important;
  line-height:1.15 !important;
  letter-spacing:.08em !important;
  text-transform:none !important;
  text-shadow:0 0 24px rgba(183,148,255,.18);
}
.infinite-forms-exhibit > #subtitle,
.infinite-forms-exhibit #header :is(.byline,.subtitle,.sub) {
  display:block;
  width:min(620px,88vw);
  margin:.65rem auto 0 !important;
  color:#afc8c3 !important;
  font-size:max(.62rem,10px) !important;
  font-weight:600 !important;
  line-height:1.5 !important;
  letter-spacing:.18em !important;
  text-align:center !important;
}
.infinite-forms-exhibit :is(canvas,svg) { filter:saturate(1.32) contrast(1.06); }
.infinite-forms-exhibit :is(#ask-btn,.ctrl-btn,.preset-btn,.toggle-btn,.mode-tab) {
  border-color:rgba(183,148,255,.42) !important;
  color:#dbc9ff !important;
}
.infinite-forms-exhibit :is(#ask-btn,.ctrl-btn,.preset-btn,.toggle-btn,.mode-tab):hover,
.infinite-forms-exhibit :is(#ask-btn,.ctrl-btn,.preset-btn,.toggle-btn,.mode-tab).active {
  border-color:var(--prismara-form-teal) !important;
  color:#effffc !important;
  background:rgba(105,212,197,.1) !important;
  box-shadow:0 0 22px rgba(183,148,255,.17);
}
.infinite-forms-exhibit :is(.c-name,.c-hz,.panel-label,.preset-label,.ctrl-btn) {
  font-size:max(.6rem,10px) !important;
  font-weight:600 !important;
}
.mobius-oracle-exhibit #sub {
  color:#d9c6ff !important;
  font-size:max(.7rem,11px) !important;
  font-weight:600 !important;
  letter-spacing:.22em !important;
}
.mobius-oracle-exhibit::before {
  content:'Möbius Oracle';
  position:fixed;
  top:4.15rem;
  left:50%;
  z-index:20;
  transform:translateX(-50%);
  color:#f5f0ff;
  font:400 clamp(1.3rem,2.7vw,2rem)/1.15 'Poppins',sans-serif;
  letter-spacing:.08em;
  white-space:nowrap;
  text-shadow:0 0 24px rgba(183,148,255,.18);
}

/* Quantum Veil: art first; theory and instrumentation stay available on demand. */
.quantum-veil-exhibit > #header,
.parallel-paths-exhibit #header {
  box-sizing:border-box;
  width:100%;
  padding-top:3.8rem !important;
  text-align:center !important;
}
.quantum-veil-exhibit #header h1,
.parallel-paths-exhibit #header h1 {
  color:#fff3e9 !important;
  font-family:'Poppins',sans-serif !important;
  font-size:clamp(1.15rem,2.4vw,1.8rem) !important;
  font-weight:500 !important;
  line-height:1.2 !important;
  letter-spacing:.07em !important;
  text-transform:none !important;
}
.quantum-veil-exhibit #header :is(.sub,.subtitle,h2) {
  color:#e6b99d !important;
  font-size:max(.62rem,10px) !important;
  font-weight:600 !important;
  line-height:1.5 !important;
  letter-spacing:.16em !important;
}
.prismara-theory-toggle {
  display:block;
  margin:.75rem auto .35rem;
  padding:.48rem 1rem;
  border:1px solid rgba(232,137,78,.4) !important;
  border-radius:999px;
  color:#f2c5a9 !important;
  background:rgba(232,137,78,.055) !important;
  font:600 max(.58rem,9.5px) 'Poppins',sans-serif !important;
  letter-spacing:.16em;
  text-transform:uppercase;
  cursor:pointer;
}
.prismara-theory-toggle:hover,.prismara-theory-toggle:focus-visible {
  color:#fff6ef !important;
  border-color:#ee9b67 !important;
  box-shadow:0 0 22px rgba(232,137,78,.15);
  outline:none;
}
.quantum-veil-exhibit .prismara-theory-panel {
  opacity:.18;
  filter:saturate(.45);
  max-height:2px;
  margin-top:.3rem !important;
  overflow:hidden;
  pointer-events:none;
  transition:opacity .4s ease,filter .4s ease,max-height .55s ease,margin .4s ease;
}
.quantum-veil-exhibit.theory-open .prismara-theory-panel {
  opacity:.82;
  filter:saturate(.82);
  max-height:900px;
  pointer-events:auto;
}
.quantum-veil-exhibit :is(.ctrl-btn,.mode-tab,.btn,.obs-btn,.branch-btn) {
  font-size:max(.6rem,10px) !important;
  font-weight:600 !important;
}
.parallel-paths-exhibit #artist-card { opacity:.55; }

@media (max-width:700px) {
  .infinite-forms-exhibit > :is(#title,#header),
  .quantum-veil-exhibit > #header { padding-top:4.5rem !important; }
}

/* Living Systems: luminous biology, quieter instrumentation. */
.living-systems-exhibit > :is(#title,#header) {
  box-sizing:border-box;width:100%;padding-top:3.9rem !important;text-align:center !important;
}
.living-systems-exhibit > #title,
.living-systems-exhibit #header h1 {
  color:#ecfff7 !important;font-family:'Poppins',sans-serif !important;
  font-size:clamp(1.25rem,2.6vw,1.9rem) !important;font-weight:500 !important;
  line-height:1.2 !important;letter-spacing:.07em !important;text-transform:none !important;
  text-shadow:0 0 28px rgba(77,239,166,.2);
}
.living-systems-exhibit :is(#eq-strip,#signal-row,#strand-row,#readout) { opacity:.48;transition:opacity .3s ease; }
.living-systems-exhibit :is(#eq-strip,#signal-row,#strand-row,#readout):hover { opacity:.9; }
.living-systems-exhibit :is(.ctrl-btn,.flow-btn,.mode-tab,#fire-btn) {
  font-size:max(.6rem,10px) !important;font-weight:600 !important;
}
.hebbian-field-exhibit #canvas-wrap { filter:saturate(1.22) contrast(1.04); }
.triple-helix-exhibit #scene {
  filter:saturate(1.28) contrast(1.06) drop-shadow(0 0 24px rgba(92,225,190,.08));
}
.surface-tension-exhibit #canvas-wrap { filter:saturate(1.12) contrast(1.05); }
.surface-tension-exhibit #perception-controls {
  display:flex;flex-wrap:wrap;justify-content:center;gap:.45rem;margin:.8rem auto 0;
}
.surface-tension-exhibit #mode-guide {
  width:min(620px,90vw);margin:.55rem auto .25rem;color:#dce9e4 !important;
  font:600 max(.72rem,12px)/1.55 'Poppins',sans-serif;text-align:center;
}
.surface-tension-exhibit .perception-btn {
  padding:.48rem .9rem;border-radius:999px;border:1px solid rgba(112,215,178,.36);
  color:#c9ddd5;background:rgba(73,168,136,.05);font-family:'Poppins',sans-serif;
  letter-spacing:.12em;text-transform:uppercase;cursor:pointer;
}
.surface-tension-exhibit .perception-btn.active {
  color:#f0fff9 !important;border-color:#73e2b9 !important;background:rgba(73,210,155,.13) !important;
  box-shadow:0 0 22px rgba(73,210,155,.16);
}
.surface-tension-exhibit #perception-line {
  margin:.6rem auto 0;color:#dce9e4;font:600 max(.72rem,12px)/1.5 'Poppins',sans-serif;
  letter-spacing:.08em;text-align:center;
}
.surface-tension-exhibit .is-hidden { display:none !important; }
